<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="Lhd">
    <title>日志</title>
    <script src="/javascripts/jquery.js"></script>
    <script src="/javascripts/angular.js"></script>
    <script src="/plugin/bootstrap/js/bootstrap.js"></script>
    <script src="/js/js.js"></script>
    <link rel="stylesheet" href="/plugin/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<header>
<nav class="navbar navbar-fixed-top navbar-inverse" style="height: 50px">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
                    aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" style="color: white;" href="/">日记</a>
        </div>
    <div class="collapse navbar-collapse" style="background-color: #222" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav">
        <% if (user) { %>
        <li><a href="/u/<%= user.name %>">我的主页</a></li>
        <% } else {%>
        <li><a href="/">首页</a></li>
        <% } %>
        <li><a href="/friends">发现</a></li>
    </ul>
    <span class="time" style="display: inline-block ;color: #adadad;width: 30px;line-height: 50px;">time</span>
    <% if (user) { %>
    <ul class="nav navbar-nav navbar-right">
        <li><a href="/logout">退出</a></li>
    </ul>
    <%  } else { %>
    <ul class="nav navbar-nav navbar-right">
        <li><a href="/login">登录</a></li>
        <li><a href="/reg">注册</a></li>
    </ul>
    <% } %>
    <ul class="nav navbar-nav navbar-right">
        <li><a href="/lhd">关于</a></li>
    </ul>
    </div>
    </div>
</nav>
</header>
<div class="bg container">
<article>
    <% if (success) { %>
    <div class="cuowu"><%= success %></div>
    <% } %>
    <% if (error) { %>
    <div class="cuowu"><%= error %></div>
    <% } %>